{% extends 'base.html' %}

{% block title %}首页{% endblock %}

{% block head %}
    <link rel="stylesheet" href="{{ url_for('static',filename='css/index.css') }}">
{% endblock %}

{% block main %}
    <div class="question-main">
    <ul class="question-group">
    {% for question in questions %}
        <li>
        <div class="question-group">
            <p class="question-title"><a href="{{ url_for('detail', question_id = question.id) }}">{{ question.title }}</a></p>
            <p class="question-content">{{ question.content }}</p>
            <div class="question-info">
                <span class="question-author">{{ question.username }}</span>
                <span class="question-time">{{ question.create_time }}</span>
            </div>
        </div>
        </li>
    {% endfor %}
    </ul>
    </div>
{% endblock %}